package wells.wellsim.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import wells.wellsim.model.proto.MessageProto;
import wells.wellsim.model.proto.MessageProto.Message;

public class CustomChannelEventHandler extends SimpleChannelInboundHandler<Object> {

	@Override
	protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception {
		System.out.println(msg);

		Message ack = MessageProto.Message.newBuilder().setAction("1").setFormat("2").setTitle("3").build();

		ctx.channel().writeAndFlush(ack);
	}

}
